<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="keywords" content="pinpin社保" />
	<meta name="description" content="pinpin社保" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>社保运营后台-市场与日用户</title>
	<%@ include file="/WEB-INF/jsp/common/common.jsp" %>
</head>
<body>
	<div id="wrapper">
		<%@ include file="/WEB-INF/jsp/common/menu.jsp" %>
        <div id="page-wrapper">
        	<div class="row">
                <div class="col-lg-12">
                    <!-- 路径导航 -->
                    <ol class="breadcrumb">
				      <li>社保后台</li>
				      <li class="active">市场与日用户</li>
				      <li><a href="${userFlag_manage_uri }">用户设备号与渠道</a></li>
				    </ol>
                </div>
            </div>
            <div class="row">
            	<div class="col-lg-12">
            		<div class="panel panel-default">
            			<div class="panel-body">
        			    	<div class="form-inline dt-bootstrap no-footer">
        			    		<!-- 分页 -->
        			    		<div class="row">
        			    		    <div class="col-lg-12">
        			    		    	<form action="${list_uri }" method="POST" class="form-check" id="queryOrderForm">
        			    		    		<input type="hidden" name="pageNo" id="fpageNo" value="${pageModel.pageNo }">
	        			    				<label class="checkbox-inline">
		                                        <select class="form-control" name="market">
		                                            <option value="" selected="selected">所有应用市场</option>
		                                            <c:forEach items="${marketList }" var="ml">
		                                            	<option value="${ml }" <c:if test="${market==ml }">selected="selected"</c:if>>${ml }</option>
		                                            </c:forEach>
		                                        </select></label>
		        			    				<label class="checkbox-inline">汇总日期：
		        			    					<input type="text" class="form-control" name="startDate" placeholder="开始时间" value="${startDate }" onClick="WdatePicker()"><span>-&#12288;</span>
		        			    					<input type="text" class="form-control" name="endDate" placeholder="结束时间" value="${endDate }" onClick="WdatePicker()"></label>
		        			    			    <input type="submit" class="btn btn-primary" id="queryBtn" value="查 询" />
		        			    			    <input type="button" class="btn btn-primary" id="resetBtn" value="重置" />
        			    		    	</form>
        			    		    </div>
        			    		</div>
        			    		<div class="row">
        			    			<div class="col-lg-2">
        			    				<button type="button" onclick="exportExcel(this)" class="btn btn-info">导出</button>
        			    			</div>
									<div class="col-lg-10">
        			    				<%@ include file="../paging.jsp" %>
           			    			</div>
        			    		</div>
        			    		<!-- 表格列表 -->
        			    		<div class="row">
        			    			<div class="col-lg-12">
        			    				<table id="dataContent" class="table table-striped table-bordered table-hover no-footer table-title" role="grid">
        			    					<thead>
        			    						<tr>
                                                   <th>日期</th>
	                                                <th>应用市场</th>
	                                                <th>游客数</th>
	                                                <th>注册用户数</th>
	                                                <th>游客+注册用户数</th>
                                                </tr>
        			    					</thead>
        			    					<tbody>
	        			    					<c:forEach items="${pageModel.recordList }" var="user">
	        			    					<tr role="row">
                                                    <td>${user.genDate } </td>
                                                    <td>${user.market}</td>
                                                    <td>${user.user0 }</td>
                                                    <td>${user.user1 }</td>
                                                    <td>${user.users }</td>
        			    						</tr>
	        			    					</c:forEach>
        			    					</tbody>
        			    				</table>
        			    			</div>
        			    		</div>
        			    		<!-- 分页 -->
                                <br/>
        			    		<div class="row">
        			    			<div class="col-lg-2">
        			    			</div>
        			    			
									<div class="col-lg-10">
        			    				<%@ include file="../paging.jsp" %>
           			    			</div>
        			    		</div>
        			    	</div>
            			</div>
            		</div>
            	</div>
            </div>
        </div>
	</div>
	<script language="javascript">
	$(function(){
		//重置
		$("#resetBtn").click(function(){
			$("#queryUserForm").find("input[type='text'],input[type='select']").val("");
		});
	});
	
	function exportExcel(btnObj) {
		btnConfirm(btnObj, "确定导出 ?", "", function(){
			var f = $("#queryOrderForm");
			f.attr("action", "${export_uri}");
			f.submit();
			f.attr("action", "${list_uri}");
		});
	}
 	</script>
</body>
</html>